import java.util.Scanner;

public class Task2 {
    //最小数组方法
    public static int getMin(int[] a){
        int min = a[0];//把最小值赋值为a[0]
        for (int i = 0; i < a.length; i++) {
            if(a[i]<min){
                min = a[i];//最小值改变
            }
        }
      return min;
    }
    public static void main(String[] args) {
        int[] a = {22,24,76,12,21,33};
        System.out.println("Min = "+getMin(a));//调用getMin方法
    }
}
